﻿using System.Collections.Generic;
using StringExt;
using NUnit.Framework;

namespace DictionaryExt.Test {

    [TestFixture]
    public class ToDictionaryExceptionResultEmpty {

        [Test]
        public void OnlyPairSep() {
            Assert.Throws<PatternException>(OnlyPairSepException);
        }
        static void OnlyPairSepException() {
            const string s = "=";
            IDictionary<string, string> result = s.ToDictionary(StringExt.StringExt.RemoveSurroundingBlanks.No);
            Assert.IsTrue(result.Count == 0);
        }
    }
}
